unit FR_SeleccionarImpresora;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TF_Seleccionar_Impresoras = class(TForm)
    ComboBox1: TComboBox;
    procedure FormCreate(Sender: TObject);
    procedure ComboBox1KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

uses Printers;

{$R *.dfm}

procedure TF_Seleccionar_Impresoras.FormCreate(Sender: TObject);
begin
  ComboBox1.Items.Assign(Printer.Printers);
  ComboBox1.ItemIndex:= Printer.PrinterIndex;
end;

procedure TF_Seleccionar_Impresoras.ComboBox1KeyPress(Sender: TObject;
  var Key: Char);
begin
  if (Key = Chr(13)) then
      ModalResult:= mrOk;
end;

end.
